package com.sc.nft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DaoSchoolChild;
import com.sc.nft.entity.dto.DaoSchoolChildPageAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolChildSaveAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolChildTopGetListAllDTO;
import com.sc.nft.entity.dto.DaoSchoolChildUpdateByIdAdminDTO;
import com.sc.nft.entity.vo.DaoSchoolArticleMaterialTopIdVO;
import com.sc.nft.entity.vo.DaoSchoolChildPageAdminVO;

import java.util.List;

/**
 * dao学堂子分类表(DaoSchoolChild)表服务接口
 *
 * @author makejava
 * @since 2023-03-13 16:21:50
 */
public interface DaoSchoolChildService {

    /**
     * 分页获取1级分类列表
     *
     * @param pageRequest
     * @return
     */
    Page<DaoSchoolChildPageAdminVO> pageAdmin(DaoSchoolChildPageAdminDTO pageRequest);

    /**
     * 后台新增
     *
     * @param daoSchoolTopSaveAdminDTO
     * @return
     */
    Boolean saveAdmin(DaoSchoolChildSaveAdminDTO daoSchoolTopSaveAdminDTO);

    /**
     * 根据id修改
     *
     * @param daoSchoolChildUpdateByIdAdminDTO
     * @return
     */
    Boolean updateByIdAdmin(DaoSchoolChildUpdateByIdAdminDTO daoSchoolChildUpdateByIdAdminDTO);

    /**
     * 对应条目的数据+1
     *
     * @param id
     */
    void totalAddOne(Long id);

    /**
     * 对应条目的数据-1
     *
     * @param id
     */
    void totalSubOne(Long id);

    /**
     * 根据id删除该分组
     *
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

    /**
     * 根据id获取数据
     *
     * @param id
     * @return
     */
    DaoSchoolChild selectById(Long id);

    /**
     * 根据父集ID获取子集列表
     *
     * @param daoSchoolChildTopGetListAllDTO
     * @return
     */
    List<DaoSchoolChildPageAdminVO> selectByTopIdsGetListAll(DaoSchoolChildTopGetListAllDTO daoSchoolChildTopGetListAllDTO);


    /**
     * 根据父集id,获取子集列表
     * @param topId
     * @return
     */
    List<DaoSchoolArticleMaterialTopIdVO>selectByTopId(Long topId);
}
